﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using TRec.BusinessLayer;

namespace TRec.Windows.UI.UserControls
{
    public partial class ReadOnlyEntry : UserControl
    {
        public ReadOnlyEntry()
        {
            InitializeComponent();
        }

        public void PopulateScreen( TimeEntry item )
        {
            if ( item != null )
            {
                lblPrevProj.Text = item.ProjectName;
                lblPrevTask.Text = item.TaskName;
                txtPrevDetails.Text = item.Details;
                dtpPrevStart.Value = item.StartDateTime;
                dtpPrevEnd.Value = item.EndDateTime;
                nudPrevExc.Value = item.ExceptionMinutes;
                txtPrevExc.Text = item.ExceptionDetails;
            }
        }
    }
}
